<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box{
      width: 200px;
      height: 200px;
      background: #d95d5d;
    }
    .box2{
      width: 200px;
      height: 200px;
      background: #69c250;
    }
  </style>
</head>
<body>
  <div id="app">
    <button @click="isShow = !isShow">
      {{isShow? '隐藏':'显示'}}
    </button>
     <div class="box" v-if="isShow"></div>
     <div class="box2" v-else></div>
  </div>

  <script src="./vue.global.js"></script>
  <script>
    const { createApp } = Vue;
    const app = createApp({
      data(){
        return {
          isShow: true
        }
      },
      methods: {
        
      },

    });
    app.mount('#app');

  </script>
</body>
</html>